PyIgnition

https://github.com/animatinator/PyIgnition update for Python 3
Clone: git clone https://git.frombelow.net/PyIgnition.git
Log | Files | Refs | README

PPE (Pygame Particle Effect) file format.xml (3344B)


      1 <?xml version = "1.0"?>
      2 <?pyignition version = "1.0"?>
      3 
      4 <effect>
      5 <!-- This represents a ParticleEffect class -->
      6 	<source>
      7 	<!-- This is a ParticleSource - all variables are stored here -->
      8 		<pos>(300, 300)</pos>
      9 		<initspeed>10</initspeed>
     10 		<initdirection>3.141592653</initdirection>
     11 		<initspeedrandrange>10</initspeedrandrange>
     12 		<initdirectionrandrange>0.0</initdirectionrandrange>
     13 		<particlesperframe>5</particlesperframe>
     14 		<particlelife>1000</particlelife>
     15 		<genspacing>0</genspacing>
     16 		<drawtype>point</drawtype>
     17 		<!-- drawtype can be any of:
     18 		-point
     19 		-circle
     20 		-line
     21 		-scaleline
     22 		-bubble
     23 		-image
     24 		These are replaced with the appropriate constants when loaded -->
     25 		<colour>(100, 200, 100)</colour>
     26 		<radius>3.0</radius>
     27 		<length>3.0</length>
     28 		<imagepath>Raves.jpg</imagepath>
     29 		<keyframes>
     30 		<!-- Note that the keyframe for frame zero is automatically created on ParticleSource
     31 		initialisation, and so does not need to be defined here -->
     32 			<keyframe frame = "30">
     33 				<pos>None</pos>
     34 				<!-- Although keyframes shown in this example file omit several variables, in the
     35 				actual implementation it is more likely that all variables will be present and will
     36 				use 'None' for undefined ones as demonstrated here -->
     37 				<initspeed>None</initspeed>
     38 				<initdirection>None</initdirection>
     39 				<initspeedrandrange>None</initspeedrandrange>
     40 				<initdirectionrandrange>3.0</initdirectionrandrange>
     41 				<particlesperframe>1</particlesperframe>
     42 				<particlelife>10</particlelife>
     43 				<genspacing>100</genspacing>
     44 				<interpolationtype>linear</interpolationtype>
     45 				<!-- Can be either linear or cosine -->
     46 			</keyframe>
     47 			<keyframe frame= "35">
     48 				<colour>(0, 0, 0)</colour>
     49 				<interpolationtype>cosine</interpolationtype>
     50 			</keyframe>
     51 		</keyframes>
     52 		<particlekeyframes>
     53 		<!-- (Exclusive to ParticleSource objects) -->
     54 		<!-- As before, note that no keyframe is defined for frame 0 as this is automatically
     55 		created anyway -->
     56 			<keyframe frame = "40">
     57 				<length>1000.0</length>
     58 			</keyframe>
     59 		</particlekeyframes>
     60 	</source>
     61 	
     62 	<source>
     63 	<!-- This is another ParticleSource -->
     64 		<pos>(100, 250)</pos>
     65 		<initspeed>40</initspeed>
     66 		<initdirection>3.141592653</initdirection>
     67 		<initspeedrandrange>1000</initspeedrandrange>
     68 		<initdirectionrandrange>10.0</initdirectionrandrange>
     69 		<particlesperframe>5000</particlesperframe>
     70 		<particlelife>1</particlelife>
     71 		<genspacing>50</genspacing>
     72 		<drawtype>bubble</drawtype>
     73 		<colour>(250, 100, 109)</colour>
     74 		<radius>30.0</radius>
     75 		<length>0.09</length>
     76 		<imagepath>None</imagepath>
     77 		<keyframes>
     78 			<keyframe frame = "30">
     79 				<initspeed>None</initspeed>
     80 				<initdirection>None</initdirection>
     81 				<initspeedrandrange>None</initspeedrandrange>
     82 				<initdirectionrandrange>3.0</initdirectionrandrange>
     83 				<particlesperframe>1</particlesperframe>
     84 				<particlelife>10</particlelife>
     85 				<genspacing>100</genspacing>
     86 				<interpolationtype>linear</interpolationtype>
     87 			</keyframe>
     88 			<keyframe frame= "35">
     89 				<colour>(0, 0, 0)</colour>
     90 				<interpolationtype>cosine</interpolationtype>
     91 			</keyframe>
     92 		</keyframes>
     93 		<particlekeyframes>
     94 			<keyframe frame = "40">
     95 				<length>1000.0</length>
     96 			</keyframe>
     97 		</particlekeyframes>
     98 	</source>
     99 	
    100 	<!-- All other object types follow the same pattern as the ParticleSource objects shown above -->
    101 </effect>